<?php
//用户身份 上下级变更
namespace app\adminbackstage\model;

use think\Model;
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class UserChange extends Model{

    // 模型初始化
    protected static function init()
    {
        parent::init();
        //TODO:初始化内容
    }
    
    //用户身份 上下级变更列表
    public static function userChangeList($where,$page,$num){
        /*$list = self::alias('e')
        ->field('e.*,w.w_name')
        ->leftjoin('warehouse w','w.id = e.w_id')
        ->where($where)
        ->limit(($page-1)*$num,$num)
        ->select();
        return $list;*/
    }
    
    //用户身份 上下级变更详情
    public static  function userChangeInfo($where){
        /*$info = self::where($where)
         ->find();
        return $info;*/
    }
    
    //用户身份 上下级变更数
    public static function userChangeCount($where) {
        /*return self::alias('e')
        ->field('e.*,w.w_name')
        ->leftjoin('warehouse w','w.id = e.w_id')
        ->where($where)
        ->count();*/
    }

    //用户身份 上下级变更修改
    public static function userChangeEdit($id,$update){
        /*$in = self::update($update, ['id' => $id]);
        return $in;*/
    }
    

    //用户身份 上下级变更添加
    public static function userChangeAdd(array $data){
        return self::create($data);
    }
  
}
